// rgTime.h

#ifndef _RG_TIME_H_
#define _RG_TIME_H_

#include <base/rgTypes.h>
#include <time.h>

class rgTime
{
public:

	inline void start()
	{
		begin = clock();
	}
	
	inline rgReal getTime()
	{
		return (rgReal)(clock() - begin) / CLOCKS_PER_SEC;
	}

	inline rgReal getFormatTime()
	{
		string str;
		rgReal d = (clock() - begin) / CLOCKS_PER_SEC;
		return d;
	}

private:
	clock_t begin;
	clock_t time;

};

#endif // _RG_TIME_H_
